//   Copyright 2012,2013 Vaughn Vernon
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.

package com.saasovation.agilepm.domain.model.product.sprint;

import java.util.Collection;

import com.saasovation.agilepm.domain.model.product.ProductId;
import com.saasovation.agilepm.domain.model.tenant.TenantId;

/**
 * 冲刺存储库
 * @author learn
 */
public interface SprintRepository {

    /**
     * 获取所有产品冲刺清单
     * @param aTenantId     租户ID
     * @param aProductId    产品ID
     * @return  返回集合
     */
    public Collection<Sprint> allProductSprints(TenantId aTenantId, ProductId aProductId);

    /**
     * 下一个身份
     * @return  返回冲刺ID
     */
    public SprintId nextIdentity();

    /**
     * 移除（冲刺）
     * @param aSprint  冲刺
     */
    public void remove(Sprint aSprint);

    /**
     * 移除所有（冲刺清单）
     * @param aSprintCollection 冲刺清单
     */
    public void removeAll(Collection<Sprint> aSprintCollection);

    /**
     * 保存（冲刺）
     * @param aSprint 冲刺
     */
    public void save(Sprint aSprint);

    /**
     * 保存所有（冲刺清单）
     * @param aSprintCollection  冲刺清单
     */
    public void saveAll(Collection<Sprint> aSprintCollection);

    /**
     * 获取ID的冲刺
     * @param aTenantId     租户ID
     * @param aSprintId     冲刺ID
     * @return              返回冲刺
     */
    public Sprint sprintOfId(TenantId aTenantId, SprintId aSprintId);
}
